package com.atguigu.service;

import com.atguigu.bean.Employee;
import com.atguigu.mybatis.dao.EmployeeMapper;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author : leimingchao
 * @version V1.0
 * @Project: mybatis
 * @Package com.atguigu.service
 * @Description: TODO
 * @date Date : 2021年05月22日 14:50
 */
@Service
public class EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Autowired
    private SqlSession sqlSession;

    public List<Employee> getEmployees(){
//        EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
        return employeeMapper.getEmployees();
    }
}
